<!-- 市场页面视图 - 展示市场相关信息和功能 -->
<template>
  <div class="market-insight-container">
    <button class="back-button" @click="goBack">返回</button>
    <h1 class="page-title">市场洞察</h1>
    
    <div class="cards-container">
      <div class="insight-card">
        <h2 class="card-title">数据采集</h2>
      </div>
      
      <div class="insight-card">
        <h2 class="card-title">数据分析与可视化</h2>
      </div>
      
      <div class="insight-card">
        <h2 class="card-title">个性化服务</h2>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router';

// 市场洞察页面组件
const router = useRouter();

// 返回登录后的界面
const goBack = () => {
  router.push('/home');
};
</script>

<style scoped>
.market-insight-container {
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  box-sizing: border-box;
  position: relative;
}

.back-button {
  position: absolute;
  top: 40px;
  left: 40px;
  width: 50px;
  height: 25px;
  background-color: blue;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.back-button:hover {
  background-color: #0000cc;
}

.page-title {
  text-align: center;
  color: #333;
  font-size: 48px;
  margin-bottom: 60px;
  font-weight: bold;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  justify-content: center;
}

.insight-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 40px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.insight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.card-title {
  color: #667eea;
  font-size: 24px;
  margin: 0;
  font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .market-insight-container {
    padding: 20px;
  }
  
  .back-button {
    top: 20px;
    left: 20px;
  }
  
  .page-title {
    font-size: 36px;
    margin-bottom: 40px;
  }
  
  .insight-card {
    padding: 30px;
    min-height: 180px;
  }
  
  .card-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  
  .cards-container {
    gap: 20px;
  }
  
  .insight-card {
    padding: 25px;
    min-height: 150px;
  }
  
  .card-title {
    font-size: 18px;
  }
}
</style>